//author: Jevgeni Krutov
//author: Sri Harsha Chilakapati

uniform mat4 projection;
uniform mat4 view;
uniform mat4 model;

varying vec4 vColor;
varying vec3 vPosition;
varying vec3 vNormal;
uniform mat4 mNormal;

void main()
{
	vColor = gl_Color; // -> to fragment shader
	vPosition = (view * model * gl_Vertex).xyz; //-> to fragment shader
    vNormal = normalize(mNormal * vec4(gl_Normal, 1.0)).xyz; //-> to fragment shader
    gl_Position = projection * view * model * gl_Vertex;
}